<?php namespace App\Domain\Lendlist\Service;


use App\Domain\Lendlist\Model\Lendlist;

class LendlistServiceImpl implements LendlistService
{
    public function delListByBookid($bookid){
        return Lendlist::where('BookID',$bookid)
            ->delete();
    }

    public function insertLendlist($BookID,$ReaderID,$LendDoorID){
       return Lendlist::create([
           'BookID'=>$BookID,
           'ReaderID' => $ReaderID,
           'LendDoorID'=>$LendDoorID,
           'LendDate'=>time()
       ]);

    }

}